//
//  NSString+Normal.h
//  DS_PJ_01
//
//  Created by admin on 16/7/16.
//  Copyright © 2016年 zhiqiyun. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "GTMBase64.h"

#define des_key @"asbgj888"


//判断字符串是否为空
#define DS_NULL(str) (str == nil) ? @"":str

@interface NSString (Normal)


//转换成Json字符串格式
+ (NSString*)dataToJson:(id)object;

//判断是否是空字符串,如果不是,则返回原来的参数,如果是则返回@""
-(NSString *)isNULL;


//MD5
- (NSString *)MD5Hash;


//Des加密
-(NSString *)encryptUseDES;
-(NSString *) encryptUseDES_Key:(NSString *)key;
//Des解密
-(NSString *)decryptUseDES;
-(NSString *)decryptUseDES_Key:(NSString *)key;





//关于NSUserDefaults
//存入一个值到NSUserDefaults ;  return YES则保存成功
-(BOOL)saveValueToUserDefalutsWithKey:(NSString *)key;

//使用方法 [@"Key" getUserDefaultsValue]，返回NSUserDefaults存入的值
-(id)getUserDefaultsValue;











@end
